package com.juli.v2xdemo.presenter;

/**
 * Created by XinYi on 2019/5/21.
 */

public class PresenterManager {
    private static final PresenterManager ourInstance = new PresenterManager();
    private TcpPresenter tcpPresenter;


    public static PresenterManager getInstance() {
        return ourInstance;
    }

    private PresenterManager() {
    }





    public void registTcpPresenter(TcpPresenter tcpPresenter){
        this.tcpPresenter = tcpPresenter;
    }






    public void init(){
        if(tcpPresenter != null){
            tcpPresenter.init();
        }
    }


    public void onDestroy() {

      /*  if(tcpPresenter != null){
            tcpPresenter.disConnect();
        }*/
    }


    public TcpPresenter getTcpPresenter() {
        return tcpPresenter;
    }


}
